package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.*;
import com.ruoyi.system.api.factory.RemoteManagerFallbackFactory;
import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户服务
 * 
 * @author ruoyi
 */
@FeignClient(contextId = "remoteManagerService", value = ServiceNameConstants.MANAGER_SERVICE, fallbackFactory = RemoteManagerFallbackFactory.class)
public interface RemoteManagerService
{
    //1. 根据分类id查询广告列表
    @GetMapping("/content/findContentsByCategoryId/{categoryId}")
    R<List<Content>> findContentsByCategoryId(@PathVariable("categoryId") Long categoryId);

    //2. 查询审核通过的sku商品列表
    @GetMapping("/item/findAll")
    R<List<Item>> findAllItems();

    //3. 根据商品id查询出商品对象
    @GetMapping("/goods/findById/{id}")
    R<Goods> findById(@PathVariable("id") Long id);

    //4. 根据商品id查询商品描述信息
    @GetMapping(value = "/desc/findGoodsDescById/{goodsId}")
    R<GoodsDesc> findGoodsDescById(@PathVariable("goodsId") Long goodsId);

    //5. 根据goodsId查询sku商品列表
    @GetMapping("/item/findSkuList/{goodsId}")
    R<List<Item>> findSkuList(@PathVariable("goodsId") Long goodsId);

    @GetMapping("/item/findById/{id}")
    R<Item> findItemById(@PathVariable("id") Long id);
}
